package com.zhanbo.zhanbowymusic.main.featured.adapter;

import android.content.Context;

import com.mwx.baselib.base.BaseBindingAdapter;
import com.mwx.baselib.bean.RankingListBean;
import com.zhanbo.zhanbowymusic.R;
import com.zhanbo.zhanbowymusic.databinding.ItemHomeOfficialBinding;
import com.zhanbo.zhanbowymusic.databinding.ItemNewMusicBinding;

public class FeaturedHomeOfficialMusicListAdapter extends BaseBindingAdapter<RankingListBean.ItemsDTO.SongDTO, ItemHomeOfficialBinding> {
    public FeaturedHomeOfficialMusicListAdapter(Context context) {
        super(context);
    }

    @Override
    protected int getLayoutResId(int viewType) {
        return R.layout.item_home_official;
    }

    @Override
    protected void onBindItem(ItemHomeOfficialBinding binding, RankingListBean.ItemsDTO.SongDTO item) {
        binding.tvName.setText(item.getSong().getName()+"");
        binding.tvSingerName.setText("-"+item.getSong().getArtistName());
        binding.tvNum.setText((getPosition()+1)+"");
    }
}
